package com.ocm.tourism.core.domain;

import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;


public enum LanguageType {
    EN,VN;

    public static LanguageType getLanguageType(Locale locale){
       if (Locale.ENGLISH.equals(locale)){
          return LanguageType.EN;
       }
       return LanguageType.VN;
    }

    public static LanguageType current(){
       return getLanguageType(LocaleContextHolder.getLocale());
    }

    public static boolean isNotDefault(){
       if (LanguageType.current() == LanguageType.VN){
          return false;
       }
       return true;
    }
}
